/*
** loop.c for zappy in /home/guidet_m/TECK2/projets/zappy/server_zappy
** 
** Made by michael guidet
** Login   <guidet_m@epitech.net>
** 
** Started on  Mon Jul  4 15:36:07 2011 michael guidet
** Last update Tue Jul  5 10:20:24 2011 michael guidet
*/

#include "server.h"

void	loop(t_env *e)
{
  t_fd	*tmp;

  while (1)
    {
      refresh_fd(e);
      check_fd(e);
      for (tmp = e->fd; tmp; tmp = tmp->next)
	if (tmp->type == AI || tmp->type == GRAPH)
	  add_to_action_list(tmp, e);
      execute_action(e);
      clean_fd(e);
      pop_ressources(e);
    }
}
